www.gusucode.com > 云网互动影视系统(12套模版和资源联盟) 6.2 > 云网互动影视系统(12套模版和资源联盟) 6.2.4/免费版/Users/Users_Reg.asp

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<META content=ywnt,云网互动影视管理系统 name=keywords>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>用户注册</title>
<link href="style/nav.css" rel="stylesheet" type="text/css" />
</head>
<body>
<!--#include file="../conn.asp"-->
<!--#include file="../Function/Function.asp"-->
<!--#include file="../function/MD5.asp" -->
<!--#include File = "../API/API_Config.asp"-->
<!--#include File = "../API/API_Function.asp"-->
<script language="javascript" src="js/passwordstrength.js"></script>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
     <tr>
       <td width="100%" valign="top"><table width="690" border="0" align="center" cellpadding="0" cellspacing="0">
         <tr>
           <td height="43" background="images/user_top.gif"><table width="100%" border="0" cellpadding="0" cellspacing="0">
             <tr>
               <td width="6%">&nbsp;</td>
               <td width="94%">用户注册</td>
             </tr>
           </table></td>
         </tr>
       </table><br />
<table width="90%" border="0" align="center" cellpadding="5" cellspacing="0">
         <tr>
           <td bgcolor="#f7f7f7"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="login">
             <tr>
               <td><br>
<%if GetUsersSystem("UsersRegOn") =0 then
	call ShowErr("<li>暂时关闭注册功能</li>","Users_Reg.asp",0)
End if
 
Sub RegSave()
		if CheckCF("UsersName",NoSqlHack(request.Form("usersid")),"'")>0 then 
		call ShowErr("<li>用户名已被占用,请重新输入!</li>","javascript:history.go(-1);",0)
		end if
		if CheckCF("UsersEmail",NoSqlHack(request.Form("email")),"'")>0 then 
		call ShowErr("<li>Email已被占用,请重新输入!</li>","javascript:history.go(-1);",0)
		end if
		
		If API_Enable Then
        FoundErr = False
        ErrMsg = ""
        sPE_Items(conAction, 1) = "reguser"
        sPE_Items(conUsername, 1) = NoSqlHack(request.Form("usersid"))
        sPE_Items(conPassword, 1) = NoSqlHack(Request.Form("password"))
        sPE_Items(conQuestion, 1) = NoSqlHack(Request.Form("question"))
        sPE_Items(conAnswer, 1) = NoSqlHack(Request.Form("answer"))
        sPE_Items(conEmail, 1) = NoSqlHack(request.Form("email"))
        sPE_Items(conUserstatus, 1) = 1
        sPE_Items(conJointime, 1) = Now()
        sPE_Items(conUserip, 1) = Request.ServerVariables("REMOTE_ADDR")
        sPE_Items(conTruename, 1) = NoSqlHack(Request.Form("usersname"))
        sPE_Items(conGender, 1) = ""
        sPE_Items(conBirthday, 1) = ""
        sPE_Items(conQQ, 1) = NoSqlHack(Request.Form("QQ"))
        sPE_Items(conMsn, 1) = ""
        sPE_Items(conMobile, 1) = ""
        sPE_Items(conTelephone, 1) = ""
        sPE_Items(conProvince, 1) = ""
        sPE_Items(conCity, 1) = ""
        sPE_Items(conAddress, 1) = ""
        sPE_Items(conZipcode, 1) = ""
        sPE_Items(conHomepage, 1) = ""
        If createXmlDom Then
            prepareXML True
            SendPost
            If FoundErr Then
                ErrMsg = "<li>" & ErrMsg & "</li>"
            End If
        Else
            FoundErr = True
            ErrMsg = "<li>目前注册服务不可用! [APIError-XmlDom-Runtime]</li>"
        End If
    End If
		
		Set Rs=Server.CreateObject(YWNT_TMS_RS)
		sql="select * from YWNT_TMS_Users"
		Rs.open sql,Conn,1,3
		Rs.addnew
		RS("UsersName")=NoSqlHack(Request.Form("usersid"))
		RS("UsersPassword")=md5(NoSqlHack(Request.Form("password")),16)
		RS("UsersProblems")=NoSqlHack(Request.Form("question"))
		RS("UsersAnswer")=NoSqlHack(Request.Form("answer"))
		RS("UsersGroup")=GetUsersSystem("UsersRegGroup")
		RS("UsersType")=GetUsersSystem("UsersRegType")
		Select Case GetUsersSystem("UsersRegType")
		Case 0
		RS("UsersCoin")=GetUsersSystem("UsersRegCoin")
		RS("UsersCoinDate")=Now()
		Case 1
		RS("UsersCoinDate")=Now()+GetUsersSystem("UsersRegDate")
		RS("UsersCoin")=0
		End Select
		RS("UsersTrueName")=NoSqlHack(Request.Form("usersname"))
		RS("UsersEmail")=NoSqlHack(Request.Form("email"))
		RS("UsersQQ")=NoSqlHack(Request.Form("QQ"))
		RS("UsersRegDate")=date()
		Rs.Update
		Rs.Close
		Set Rs = Nothing
		call ShowErr("<li>添加用户成功</li>","Users_Right.asp",1)
End Sub
Action=Trim(request("Action"))
Select Case Action
Case "Reg2"
	call Reg2()
Case "RegSave"
	call RegSave()
Case else
	call Reg1()
End Select
sub Reg1()
Set Rs=Server.CreateObject(YWNT_TMS_RS)
sql="select * from YWNT_TMS_UsersRegNotice"
Rs.open sql,Conn,1,1
YWNT_TMS_ID=RS("ID")
YWNT_TMS_RegNotice=RS("RegisterNotice")
RS.close   
set RS=nothing%>
                 <table width="80%" align="center" cellpadding="0" cellspacing="0">
				 <form action="Users_Reg.asp?Action=Reg2" method="post">
                   <tr>
                     <td height="32">注册条款</td>
                    </tr>
                   <tr>
                     <td><div class="textarea"><%=YWNT_TMS_RegNotice%></div>
                       <table width="100%" border="0" cellpadding="0" cellspacing="0">
                           <tr>
                             <td height="30" align="center"><input type="submit" name="Submit" value="同 意" /></td>
                           </tr>
                                              </table></td>
                    </tr>
					</form>
                 </table>
<%end sub
sub Reg2()%>		
				<script language="javascript" src="js/js.js"></script>		 
                 <table width="70%" align="center" cellpadding="0" cellspacing="0">
				 <form name="form" id="Reg" action="Users_Reg.asp?Action=RegSave" method="post" onSubmit="return Validator.Validate(this,3)">
                 <tr>
                   <td width="20%" height="32">用 户 名:</td>
                   <td colspan="2"><input name="usersid" id="usersid" size="30" dataType="LimitB" min="3" max="20" msg="用户名必须在3,20个字节之内"/></td>
                 </tr>
                 <tr>
                   <td height="32">用户密码:</td>
                   <td colspan="2"><input name="Password" type="password" onfocus="opencat('PasswordJc');" onblur="opencat('PasswordJc');" onKeyUp="ps.update(this.value);" value="" size="30" dataType="Limit" min="6" msg="密码不能少于6个字"/></td>
                 </tr>
				 <tr id="PasswordJc" style="display: none;">
                   <td height="32">密码强度:</td>
                   <td colspan="2"><script language="javascript">
									var ps = new PasswordStrength();
									ps.setSize("200","20");
									ps.setMinLength(5);
									</script>
					</td>
				 </tr>
                 <tr>
                   <td height="32">重复密码:</td>
                   <td colspan="2"><input name="Password2" type="password" size="30" dataType="Repeat" to="Password" msg="两次输入的密码不一致"/></td>
                 </tr>
				 <tr>
                   <td height="32">密码提示问题:</td>
                   <td colspan="2"><input name="question" size="30" dataType="LimitB" min="6" msg="密码问题不能少于6个字"/></td>
                 </tr>
                 <tr>
                   <td height="32">密码提示答案:</td>
                   <td colspan="2"><input name="answer" size="30" dataType="LimitB" min="6" msg="密码答案不能少于6个字"/></td>
                 </tr>
				 <tr>
                   <td height="32">真实姓名:</td>
                   <td colspan="2"><input name="usersname" size="30" dataType="Chinese" msg="真实姓名只允许中文"/></td>
                 </tr>
                 <tr>
                   <td height="32">电子邮箱:</td>
                   <td colspan="2"><input name="email" size="30" dataType="Email" msg="信箱格式不正确"/></td>
                 </tr>
                 <tr>
                   <td height="32">联系Q Q:</td>
                   <td colspan="2"><input name="QQ" size="30" maxlength="12" dataType="QQ" msg="QQ号码不存在"/></td>
                 </tr>
                 <tr>
                   <td colspan="3" height="26"><table width="100%" border="0" cellpadding="0" cellspacing="0">
                     <tr>
                       <td width="29%">&nbsp;</td>
                       <td width="71%" height="30"><input type="image" name="imageField" src="images/qd_06.gif" /></td>
                     </tr>
                   </table></td>
                 </tr>
				 </form>
               </table>
                <br></td>
             </tr>
           </table></td>
         </tr>
       </table></td>
     </tr>
   </table>
  <SCRIPT language=JavaScript type=text/JavaScript>
function opencat(cat)
{
	  if(document.getElementById(cat).style.display=="none")
	  {
		 document.getElementById(cat).style.display="";
	  }
	  else
	  {
		 document.getElementById(cat).style.display="none"; 
	  }
}
</SCRIPT>
<%end sub
call connclose()%>
</body>
</html>